//
//  FactoryTest.m
//  DesignMode
//
//  Created by orvibo on 2018/12/29.
//  Copyright © 2018 Alic. All rights reserved.
//

#import "FactoryTest.h"

#import "EquipmentGenerator.h"
#import "iMacGenerator.h"
#import "iPhoneGenerator.h"
#import "FoxconnFactory.h"

@implementation FactoryTest

-(void)test{
    
    //  首先我们指定厂商生产iMac设备
    iMacGenerator *imacGenerator = [[iMacGenerator alloc] init];
    FoxconnFactory *factory = [[FoxconnFactory alloc] init];
    [factory makeEquipmentWithGenerator:imacGenerator];
    
    //  然后我们指定厂商生产iPhone设备
    iPhoneGenerator *iphoneGenerator = [[iPhoneGenerator alloc] init];
    [factory makeEquipmentWithGenerator:iphoneGenerator];
}

@end
